<?php
namespace app\common\lib\exception;
 
use think\Exception;
use Throwable;
 
//自定义  exception方法
class ApiException extends Exception{
 
    public  $message = '';
    public  $httpCode = 500;
    public  $code = 0;

    public  function  __construct($message = '',$httpCode = 0 ,$code = 0)
    {
        echo '88888';
        //$this->message = $message;
        $this->message = mb_convert_encoding($message, 'UTF-8', 'UTF-8, GBK, GB2312, BIG5');
        $this->httpCode = $httpCode;
        $this->code = $code;
    }

}